using System.Collections;
using System.Collections.Generic;
using Resources.Scripts.Socket.MyChat.Client;
using TMPro;
using UnityEngine;

public class ShowReceiveTip : MonoBehaviour
{
    private TMP_Text message;

    void Start()
    {
        message = GetComponentInChildren<TMP_Text>();
        NetClient.Instance.ShowTip += ShowTip;
        Hide();
    }


    void Update()
    {
        
    }

    private void ShowTip(string msg) { 
        message.text = msg;
        gameObject.SetActive(true);
        Invoke("Hide", 10f);
    }

    private void Hide() { 
        gameObject.SetActive(false);
    }
}
